<?php
/**
 * Author:JunSong
 * CreatedTime: 2021/4/14 9:49
 */


namespace app\admin\Controller;

use app\Model\Attachment;
use app\Model\Users;
use Symfony\Component\Config;
class BaseController
{
    public function test(){
        $users = new Users();
        $res = $users->select()->toArray();
        return self::response(0,'ok',$res);

    }

    /**
     * @param $code
     * @param $msg
     * @param null $data
     * @return array
     * 格式化输出
     */
    public static function response($code, $msg, $data = null){
        return compact('code','msg','data');
    }

}